<?php get_header(); ?>
 
   <div id="main">
 
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
         <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
         <div id="meta">
            <p>erstellt am: <?php the_date('d.m.Y'); ?> |
            von: <?php the_author(); ?> |
            Kategorie(n): <?php the_category(', '); ?></p>
         </div>
         <div class="entry">
            <?php the_content(); ?>
         </div>
	<footer class="entry-meta">
            
            <?php edit_post_link( __( 'Edit', 'Pokerface' ), '<span class="edit-link">', '</span>' ); ?>
			
      <?php endwhile; endif; ?>
	  
	 // Delete from Front-End Link

	<?php function wp_delete_post_link($link = 'Delete This', $before = '', $after = '', $title="Move this item to the Trash", $cssClass="delete-post") {
    global $post;
    if ( $post->post_type == 'page' ) {
        if ( !current_user_can( 'edit_page' ) )
            return;
    } else {
        if ( !current_user_can( 'edit_post' ) )
            return;
    }
    $delLink = wp_nonce_url( site_url() . "/wp-admin/post.php?action=trash&post=" . $post->ID, 'trash-' . $post->post_type . '_' . $post->ID);
    $link = '<a class="' . $cssClass . '" href="' . $delLink . '" onclick="javascript:if(!confirm(\'Are you sure you want to move this item to trash?\')) return false;" title="'.$title.'" />'.$link."</a>";
    return $before . $link . $after;
	}
	?>
 
		<?php comments_template(); ?>
 
   </div><!-- main -->
 
   <div id="sidebar">
      <?php get_sidebar(); ?>
   </div><!-- sidebar --> 
 
<?php get_footer(); ?>